package com.liang.propertiesio;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class PropertiesDemo {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();
        FileReader fr = new FileReader("prop.properties");
        prop.load(fr);

        fr.close();
        String username = prop.getProperty("username");
        System.out.println(username);
        String password = prop.getProperty("password");
        System.out.println(password);
        System.out.println(prop);
    }
}
